Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #3421

Closed
wants to merge 4 commits into from
Closed

Develop #3421

wants to merge 4 commits into from

Conversation

src/style.css Outdated
Comment on lines 22 to 60
.stars--1 .stars__star:nth-child(-n + 1) {
margin: 0 4px;
width: 16px;
height: 16px;
background-image: url(../src/images/star-active.svg);
background-repeat: no-repeat;
}

.stars--2 .stars__star:nth-child(-n + 2) {
margin: 0 4px;
width: 16px;
height: 16px;
background-image: url(../src/images/star-active.svg);
background-repeat: no-repeat;
}

.stars--3 .stars__star:nth-child(-n + 3) {
margin: 0 4px;
width: 16px;
height: 16px;
background-image: url(../src/images/star-active.svg);
background-repeat: no-repeat;
}

.stars--4 .stars__star:nth-child(-n + 4) {
margin: 0 4px;
width: 16px;
height: 16px;
background-image: url(../src/images/star-active.svg);
background-repeat: no-repeat;
}

.stars--5 .stars__star:nth-child(-n + 5) {
margin: 0 4px;
width: 16px;
height: 16px;
background-image: url(../src/images/star-active.svg);
background-repeat: no-repeat;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. you have most of styles at the common class selector stars__star
  2. you can list as a group
Suggested change
.stars--1 .stars__star:nth-child(-n + 1) {
margin: 0 4px;
width: 16px;
height: 16px;
background-image: url(../src/images/star-active.svg);
background-repeat: no-repeat;
}
.stars--2 .stars__star:nth-child(-n + 2) {
margin: 0 4px;
width: 16px;
height: 16px;
background-image: url(../src/images/star-active.svg);
background-repeat: no-repeat;
}
.stars--3 .stars__star:nth-child(-n + 3) {
margin: 0 4px;
width: 16px;
height: 16px;
background-image: url(../src/images/star-active.svg);
background-repeat: no-repeat;
}
.stars--4 .stars__star:nth-child(-n + 4) {
margin: 0 4px;
width: 16px;
height: 16px;
background-image: url(../src/images/star-active.svg);
background-repeat: no-repeat;
}
.stars--5 .stars__star:nth-child(-n + 5) {
margin: 0 4px;
width: 16px;
height: 16px;
background-image: url(../src/images/star-active.svg);
background-repeat: no-repeat;
}
.stars--1 .stars__star:nth-child(-n + 1),
.stars--2 .stars__star:nth-child(-n + 2),
.stars--3 .stars__star:nth-child(-n + 3),
.stars--4 .stars__star:nth-child(-n + 4),
.stars--5 .stars__star:nth-child(-n + 5) {
background-image: url(../src/images/star-active.svg);
}

}

.stars__star {
margin: 0 4px;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's better use :not(:last-child) to set margin-right to all stars besides last one

src/index.html Outdated
Comment on lines 45 to 48
<div class="stars__star c"></div>
<div class="stars__star c"></div>
<div class="stars__star c"></div>
<div class="stars__star c"></div>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove redundant selectors

Suggested change
<div class="stars__star c"></div>
<div class="stars__star c"></div>
<div class="stars__star c"></div>
<div class="stars__star c"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>

src/index.html Outdated
</div>

<div class="stars stars--5">
<div class="stars__star c"></div>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same

@DudeMood DudeMood closed this Jul 31, 2023
@DudeMood DudeMood reopened this Jul 31, 2023
@DudeMood DudeMood closed this by deleting the head repository Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants